package cn.wolfcode.luowowo.common.util;

import cn.wolfcode.luowowo.common.Exception.VisiableException;

/**
 * 断言工具类
 */
public class AssertUtil {
    /**
     * 判断是否有值
     * @param value
     * @param msg
     */
    public static void haslength(String value,String msg) {
        if(value == null || "".equals(value.trim())){
            throw new VisiableException(msg);
        }
    }

    /**
     * 判断两次密码是否相同
     * @param password
     * @param rpassword
     * @param msg
     */
    public static void isEqual(String password, String rpassword,String msg) {
         if(!password.equals(rpassword)){
             throw new VisiableException(msg);
         }
    }
}
